﻿Public Class IpTools

    Public Shared Function VerifyIp(ByVal Ip As String) As Boolean

        Dim verifica As Boolean = False

        Dim ipArray() As String = Ip.Split(".")

        If ipArray.Length = 4 AndAlso ipArray(0) > 0 AndAlso ipArray(0) < 256 Then

            For i As Integer = 1 To ipArray.Length - 1

                If ipArray(i) < -1 AndAlso ipArray(i) > 256 Then
                    Return False
                End If

            Next

            verifica = True

        End If

        Return verifica
    End Function

End Class
